<?php

/**
 * @copyright 2007 Indianapolis Museum of Art
 * 
 * @file
 * This file exposes features of dashboard to the Views module.
 */

/**
 * Implementation of hook_views_tables
 */
function dashboard_views_tables()
{
	$tables['dashboard'] = array(
        'name' => 'dashboard',
        'join' => array(
            'type' => 'inner',
            'left' => array(
                'table' => 'node',
                'field' => 'nid',
            ),
            'right' => array(
                'table' => 'dashboard',
                'field' => 'nid',
            ),
        ),
        'sorts' => array(
            'weight' => array(
                'name' => t('Dashboard: Weight'),
                'help' => t('The weight specified for the dashboard'),
            ),
        ),
        'filters' => array(
            'next_nid' => array(
                'name' => t('Dashboard: Next update'),
                'help' => t('A pointer to the next dashboard update'),
                'operator' => 'views_handler_operator_eqneq',
            ),
            'previous_nid' => array(
                'name' => t('Dashboard: Previous update'),
                'help' => t('A pointer to the previous dashboard update'),
                'operator' => 'views_handler_operator_eqneq',
            ),
            'notification' => array(
            	'name' => t('Dashboard: Notification status'),
            	'help' => t('A boolean indicating if a reminder email has been sent'),
            	'operator' => 'views_handler_operator_eqneq',
            ),
        ),
    );
    
    return $tables;
}
